-- GENERATED SPELL FOR [King Varian Wrynn] --


function spell0_32303(pUnit, Event) --@Heroic Leap,n/a--
pUnit:FullCastSpellOnTarget(59688,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32303', 0, 1)
end

function spell1_32303(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41057,pUnit)
pUnit:RegisterEvent('Sorts_32303', 601, 1)
end

function spell2_32303(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(41056,pUnit)
pUnit:RegisterEvent('Sorts_32303', 2000, 1)
end

function Sorts_32303(pUnit, Event)
local choix_sorts_32303 = math.random(0, 2)
if choix_sorts_32303 == 0 then
pUnit:RegisterEvent('spell0_32303', 1, 1)
end
if choix_sorts_32303 == 1 then
pUnit:RegisterEvent('spell1_32303', 1, 1)
end
if choix_sorts_32303 == 2 then
pUnit:RegisterEvent('spell2_32303', 1, 1)
end
end

function mob32303_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32303', math.random(1500, 3000), 1)
end

function mob32303_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32303_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32303_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32303, 1, 'mob32303_Action')
RegisterUnitEvent(32303, 2, 'mob32303_Leave')
RegisterUnitEvent(32303, 3, 'mob32303_Kill')
RegisterUnitEvent(32303, 4, 'mob32303_Die')
